﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Maticsoft.Web
{
    public partial class Main : System.Web.UI.Page
    {
        public string GetStr = null; 
        protected void Page_Load(object sender, EventArgs e)
        {

        }



        public string GetString()
        {

            if (Session["group"] != null)
            {
                if (Session["group"].ToString().Trim() == "超级管理员")
                {
                    GetStr = "../Menu/SuperAdmin.aspx";
                }
                else if (Session["group"].ToString().Trim() == "外联部经理")
                {

                    GetStr = "../Menu/NewsManager.aspx";
                }
                else if (Session["group"].ToString().Trim() == "销售部经理")
                {

                    GetStr = "../Menu/SalesManager.aspx";
                }
                else if (Session["group"].ToString().Trim() == "生产部经理")
                {

                    GetStr = "../Menu/ProductManager.aspx";
                }
                else if (Session["group"].ToString().Trim() == "注册用户")
                {

                    GetStr = "../Menu/CustomerUser.aspx";
                }
            }
            else
            {
                //注意 无session情况跳转，必须实现
                Response.Redirect("~/Login.aspx");
            }
            return GetStr;
        }
    }
}